/* 基础样式重置 */
html,body{
    height: 100%;
    width: 100%;
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family:'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
    font-size: 14px;
    color: #333;
    line-height: 1.6;
    background-color: #f5f5f5;
    display: flex;
    flex-direction: column;
}

/* 页面头部 */
.page-header {
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #6e8efb, #a777e3);
    color: white;
    box-shadow: 0 2px 4px rgb(0, 0, 0, 0.1);
}

/* 主容器 */
.container {
    max-width: 800px;
    margin: 0 auto; /* auto 可以实现水平居中 */
    padding: 10px 0;
    flex:1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.tab-content{
    flex: 1;
    overflow: auto;
}

.tab-nav {
    display: flex;
    align-items: center;

}

.tab-nav > .tab-btn {
    flex: 1;
    border: none;
    background-color: white;
    padding: 1rem;
    border-radius: 8px;
    cursor: pointer;
}

.tab-nav .tab-btn.active {
    background-color: #6e8efb;
    color: white;
}

.tab-nav > .tab-btn:first-child {
    margin-right: 10px;
}

/* 搜索样式 */
.search-section {
    margin: 10px 0;
}

.search-wrapper {
    width: 500px;
    margin: 0 auto;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 10px 50px 10px 10px;
    border: 1px solid #eee;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: #6e8efb;
}

.search-icon {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    background: #6e8efb;
    border-radius: 50%;
}

.search-icon::before {
    content: ''; /*content属性一定要写*/
    position: absolute;
    width: 10px;
    height: 2px;
    background: black;
    bottom: -2px;
    right: -5px;
    transform: rotate(45deg);
}

/* 任务列表样式 */
.task-list {
    list-style: none;
}

.task-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgb(0, 0, 0, 0.05);
    margin-bottom: 1rem;
    transition:transform 0.3s ease;
}

.task-item:hover{
    transform: translateY(-2px);
    box-shadow: 0 4px rgb(0, 0, 0, 0.1);
}

.task-content h3 {
    font-size: 16px;
}

.task-content p {
    color: #666;
    font-size: 12px;
}

.task-actions {
    display: flex;
}

.action-btn {
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    color: white;
    transition: all 0.2s ease;
}

.action-btn:first-child {
    margin-right: 10px;
}

.complete-btn {
    background-color: #4caf50;
}

.complete-btn:hover {
    background-color: #45a049;
}

.delete-btn {
    background-color: #ff4444;
}

.delete-btn:hover {
    background-color: #cc0000;
}

@media (max-width: 600px) {
    .page-header{
        height: 60px;
    }
    
    .tab-nav{
        flex-direction: column;
    }

    .btn-text{
        display: none;
    }

    .action-btn:first-child{
        margin-right: 5px;
    }

    .task-content h3{
        color: rgb(224, 28, 28);
    }
}

footer {
    
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #6e8efb, #a777e3);
    color: white;
    box-shadow: 0 2px 4px rgb(0, 0, 0, 0.1);
    padding: 20px 0;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: auto;
    padding: 0 20px;
}

.footer-links h3 {
    margin-bottom: 10px;
}

.footer-links ul {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 5px;
}

.footer-links a {
    text-decoration: none;
    color: white; 
}

.footer-links a:hover {
    text-decoration: underline; /* 鼠标悬停时下划线 */
}

.footer-copyright p {
    margin: 0;
}
